package com.xy.elasticsearch.service.impl;

import com.xy.elasticsearch.dao.EsProductRepository;
import com.xy.elasticsearch.model.EsProduct;
import com.xy.elasticsearch.service.EsProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EsProductServiceImpl implements EsProductService {
    @Autowired
    private EsProductRepository esProductRepository;

    @Override
    public int importAll() {
//        Iterable iterable = esProductRepository.findAll();
        return 1;
    }


    @Override
    public void delete(Long id) {

    }

    @Override
    public EsProduct create(Long id) {
        return null;
    }

    @Override
    public void delete(List<Long> ids) {

    }

    @Override
    public Page<EsProduct> search(String keyword, Integer pageNum, Integer pageSize) {
        return null;
    }
}
